<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>simOpenModule</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1>Regular API function</h1>
<h3 class=subsectionBar><a name="simOpenModule" id="simOpenModule"></a>simOpenModule / sim.openModule </h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>&quot;Opens&quot; a plugin (allowing it to reserve resources at the start of a simulation). This command can only be called from the main script. Call it from the <a href="../mainScript.htm">main script</a> in the first simulation pass (usually with sim.handle_all argument). <a href="simOpenModule.htm">sim.openModule</a> is not available in the C-API. Look at the default main script to get an idea about how to use <a href="simOpenModule.htm">sim.openModule</a>, <a href="simHandleModule.htm">sim.handleModule</a> and <a href="simCloseModule.htm">sim.closeModule</a>.<br></td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn><div></div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam>
<div></div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
<div></div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>
<div>(1) int result=sim.openModule(int sim.handle_all)</div>
<div>(2) int result=sim.openModule(string moduleName)</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div>sim.handle_all: indicates that all plugins should be opened</div>
<div>moduleName: the name of the plugin that should be opened</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>result</strong>: the number of plugins that executed the command.</div>
</td> 
</tr> 
</table> 


<br>
</td>
</tr>
</table>
</div>
</body>
</html>
